-
Notifications
You must be signed in to change notification settings - Fork 1
modifying object s3 routes and refactoring #248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
I like it!
We should probably have a helper route that redirects to an object's direct URL (or mints a signed URL) so that we can quickly view/download files. A small definitional quibble - The Minio client is used to implement the S3 API in Python. But fundamentally the storage backend can be Minio, Ceph, AWS, or any other S3 compatible object store. |
davenquinn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall this looks pretty good but ideally some of the naming would be tightened (esp. for env variables).
There can be elaboration for new features (e.g., multiple buckets, tracking "unowned" files) but that isn't necessary right now.
Object Storage API Summary
Tied to #8
This API provides a database-backed, S3-compatible object registry for managing uploaded files used by ingestion pipelines and downstream services. The database is treated as the source of truth, while MinIO/S3 is used as the physical storage layer.
The API is fully stateless, does not rely on ORM models or schemas, and operates using explicit SQL queries and direct MinIO operations.
GET /objectList objects from
storage.objectstorage.objectslug→ prefix match on object key (slug/%)include_deleted→ include soft-deleted rowsGET /object/{id}Fetch a single object by ID
404if object does not existPOST /objectUpload and register new objects
multipart/form-dataunder field nameobjectstorage.objectMay want to remove this functionality since this would allow the db data to diverge from what's in the s3 bucket.
PATCH /object/{id}Update object metadata in database only
keymime_typesourceDELETE /object/{id}?hard=true|falseDelete object
Soft delete (
hard=false)deleted_onin databaseHard delete (
hard=true, default)storage.objectThis guarantees consistency between physical storage and database state.
Design Principles